/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package diet.XMLUtils;

import java.util.List;
import diet.dto.FoodDTO;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
 * @author DungTT
 */
@XmlAccessorType(XmlAccessType.FIELD)
//@XmlType(name = "", propOrder = {
//    "foods"
//})
@XmlRootElement(name = "foods")
public class Foods {

    @XmlElement(required = true)
    private List<FoodDTO> food;

    /**
     * @return the food
     */
    public List<FoodDTO> getFood() {
        if (food == null) {
            setFood(new ArrayList<FoodDTO>());
        }
        return this.food;
    }

    /**
     * @param food the food to set
     */
    public void setFood(List<FoodDTO> food) {
        this.food = food;
    }

}
